/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-08-19
 * Time: 20:48
 */
class Message<T> {
    private T message ;
    public T getMessage() {
        return message;
    }
    public void setMessage(T message) {
        this.message = message;
    }
}

public class Test {
        public static void main1(String[] args) {
            Message<String> message = new Message<>() ;
            message.setMessage("比特就业课欢迎您");
            fun(message);

            Message<Integer> message2 = new Message<>() ;
            message2.setMessage(6);
            fun(message2);//用通配符

        }


        public static void fun(Message<?> temp){
            System.out.println(temp.getMessage());
            //temp.setMessage(12);//这种写法不对，都不知道放进来的是什么类型，怎么set
        }



}
